//
//  ClassViewController.m
//  轮胎商城
//
//  Created by 张晋磊 on 2017/3/21.
//  Copyright © 2017年 张晋磊. All rights reserved.
//

#import "ClassViewController.h"
#import "ClassTryeCell.h"

@interface ClassViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic,retain) UITableView *table;

@end

@implementation ClassViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self createTable];
    
}

-(void)createTable{

    
    _table = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height-self.tabBarController.tabBar.frame.size.height) style:UITableViewStylePlain];
    
    _table.dataSource = self;
    _table.delegate   = self;
    
    [self.view addSubview:_table];
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

    return 5;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    ClassTryeCell *cell = [tableView dequeueReusableCellWithIdentifier:@"aa"];
    
    if(!cell){
    
        cell = [[ClassTryeCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"aa"];
    }
    
    cell.img.image = [UIImage imageNamed:@""];
    cell.lab.text = @"aaa";
    
    return cell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
